<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <h2 @click="change">{{num}}</h2>
</div>
<script>
    new Vue({
        el: '#app',
        data: {
            num: 66
        },
        methods: {
            change() {
                this.num--
            },
        },
        beforeCreate() {
            console.log('beforeCreate:' + this.num)
        },
        create() {
            console.log('create:' + this.num)
        },
        beforeMount() {
            console.log('beforeMount:' + document.getElementById('app').innerText)
        },
        mounted() {
            console.log('mounted:' + document.getElementById('app').innerText)
        },
        beforeUpdate() {
            console.log('beforeUpdate:' + this.num)
            console.log('beforeUpdate:' + document.getElementById('app').innerText)
        },
        updated() {
            console.log('update:' + this.num)
            console.log('update:' + document.getElementById('app').innerText)
        },
        beforeDestroy() {},
        destroy() {},
    })
</script>
</body>
</html>